if the visible of msg is true or stringToFind is empty then
pass returnKey
else
if the foundText is not empty then
--------
put the short ID of this card into tempMemory
set the cursor to watch
set lockScreen to true
find string stringToFind
if the result is "not found" then
-- THE STRING DOES NOT OCCUR IN THE ENTIRE STACK.
play stop
play harpsichord a7t a ae
answer "No such text found." with "OK"
play harpsichord a7t ae
else
-- THE STRING OCCURS, BUT MIGHT BE IN THE WRONG BKGND.
if the short name of this bkgnd is "Directory" then
-- THE STRING IS IN THE RIGHT BKGND.
play stop
play harpsichord a7t ae
global undoMemory
put tempMemory into undoMemory
else
-- THE STRING IS IN THE WRONG BKGND.
put the short ID of this card into repeatMark
go to next card
-- THE RIGHT STRING IN RIGHT BKGND STILL NEED TO BE FOUND.
repeat until the short ID of this card = repeatMark
find string stringToFind
if the short name of this bkgnd is "Directory" then
-- THE STRING IS FOUND AND IS IN THE RIGHT BKGND.
play stop
play harpsichord a7t ae
global undoMemory
put tempMemory into undoMemory
exit returnKey
end if
end repeat
-- THE STRING ONLY OCCURS IN THE WRONG BKGND, AND NOWHERE ELSE.
--put tempMemory
--put "*"&repeatMark after msg
go to card ID tempMemory
play stop
play harpsichord a7t a ae
answer "No such text found." with "OK"
play harpsichord a7t ae
end if
end if
--------
end if
end if
end returnKey
on find
if the visible of msg is true then
show msg
end if
pass find
end find
on arrowKey buttonPressed
if buttonPressed is "up" then
go to card "First Page"
else if buttonPressed is "down" then
go to card "Last Page"
else
pass arrowKey
end if
end arrowKey
on doMenu action
if action is "Prev" then
go to prev card
else if action is "Next" then
go to next card
else if action is "First" then
go to card "First Page"
else if action is "Last" then
go to card "Last Page"
else if action is "Find..." then
send mouseUp to bkgnd button "Find"
else if action is "Text Style..." then
send mouseUp to bkgnd button "Table of Contents"
else
pass doMenu
end if
end doMenu
on help
send mouseUp to bkgnd button "Help"
end help
-- part 9 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=217 top=305 right=337 bottom=253
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Table of Contents
----- HyperTalk script -----
on mouseDown
play stop
play harpsichord a7e
end mouseDown
on mouseUp
global undoMemory
put the name of this card into undoMemory
put bkgnd field "Header" into category
put offset(":", category)-1 into nameLength
if nameLength < 0 then
put length of category into nameLength
end if
put char 1 to nameLength of category into categorySection
go to card "TOC: "&categorySection
if the result is not empty then
--beep
go to card "TOC: Root"
end if
set lockScreen to true
end mouseUp
-- part 1 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=2 top=3 right=21 bottom=451
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 12
-- style flags: 2304
-- line height: 16
-- part name: Header
-- part 5 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=343 top=3 right=20 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 20
-- text size: 12
-- style flags: 2304
-- line height: 16
-- part name: Page Number
-- part 6 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=12 top=305 right=337 bottom=48
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Help
----- HyperTalk script -----
on mouseDown
play stop
play harpsichord a7e
end mouseDown
on mouseUp
--put bkgnd field "Header" into H
--put bkgnd field "Page Number" into P
global undoMemory
put the name of this card into undoMemory
--set lockScreen to true
go to card "Help: 0"
--put H into bkgnd field "Header"
--put P into bkgnd field "Page Number"
--set lockScreen to false
set the cursor to watch
--push card
--set lockScreen to true
--repeat for 25 times
--go to next card
--put H into bkgnd field "Header"
--put P into bkgnd field "Page Number"
--end repeat
--pop card
--set lockScreen to false
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=53 top=305 right=337 bottom=89
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Print
----- HyperTalk script -----
on mouseDown
play stop
play harpsichord a7e
end mouseDown
on mouseUp
answer "Print this page?" with "Cancel" or "OK"
if it is "OK" then
print this card
end if
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=94 top=305 right=337 bottom=130
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Home
----- HyperTalk script -----
on mouseDown
play stop
play harpsichord a7e
end mouseDown
on mouseUp
doMenu Quit HyperCard
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=463 top=305 right=337 bottom=499
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Contents
----- HyperTalk script -----
on mouseDown
play stop
play harpsichord a7e
end mouseDown
on mouseUp
global undoMemory, bookMark
put the name of this card into undoMemory
put the name of this card into bookMark
visual effect iris close to black
visual effect iris open
go to card "Main Menu"
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=258 top=305 right=337 bottom=294
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Rewind
----- HyperTalk script -----
on mouseUp
set the hilite of me to true
global undoMemory, increment, firstPage
put the name of this card into undoMemory
repeat forever
set the hilite of bkgnd button "Flashing Stop" to false
set the hilite of bkgnd button "Flashing Stop" to true
set the hilite of bkgnd button "Flashing Stop" to false
set the hilite of bkgnd button "Flashing Stop" to true
if the mouse is down then
put the mouseLoc into x
if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 258 and item 1 of x < 294 and item 2 of x > 305 and item 2 of x < 337) then
play stop
play harpsichord a7e
click at 341,306
set the hilite of bkgnd button "Rewind" to false
set the hilite of bkgnd button "Flashing Stop" to false
exit mouseUp
end if
end if
if the short name of this card is not "First Page" then
get the number of this card
subtract increment from it
if it < firstPage then
put firstPage into it
end if
if the mouse is down then
put the mouseLoc into x
if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 258 and item 1 of x < 294 and item 2 of x > 305 and item 2 of x < 337) then
play stop
play harpsichord a7e
click at 341,306
set the hilite of bkgnd button "Rewind" to false
set the hilite of bkgnd button "Flashing Stop" to false
exit mouseUp
end if
end if
set lockScreen to true
go to card it
set lockScreen to false
if the mouse is down then
put the mouseLoc into x
if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 258 and item 1 of x < 294 and item 2 of x > 305 and item 2 of x < 337) then
play stop
play harpsichord a7e
click at 341,306
set the hilite of bkgnd button "Rewind" to false
set the hilite of bkgnd button "Flashing Stop" to false
exit mouseUp
end if
end if
else
play stop
play harpsichord a7e
click at 341,306
set the hilite of bkgnd button "Rewind" to false
set the hilite of bkgnd button "Flashing Stop" to false
exit mouseUp
end if
end repeat
end mouseUp
on mouseDown
play stop
play harpsichord a7e
end mouseDown
-- part 14 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=340 top=305 right=337 bottom=376
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Stop
----- HyperTalk script -----
on mouseDown
play stop
play harpsichord a7e
set lockScreen to false
end mouseDown
-- part 17 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=353 top=317 right=324 bottom=363
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Flashing Stop
----- HyperTalk script -----
on mouseDown
click at 341,306
end mouseDown
-- part 11 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=176 top=305 right=337 bottom=212
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Find
----- HyperTalk script -----
on mouseDown
play stop
play harpsichord a7e
end mouseDown
on mouseUp
hide msg
global stringToFind, firstTimeFound
ask "Text to find:" with stringToFind
if it is not empty then
put it into stringToFind
put the short ID of this card into tempMemory
set the cursor to watch
set lockScreen to true
find string stringToFind
if the result is "not found" then
-- THE STRING DOES NOT OCCUR IN THE ENTIRE STACK.
play stop
play harpsichord a7t a ae
answer "No such text found." with "OK"
play harpsichord a7t ae
else
-- THE STRING OCCURS, BUT MIGHT BE IN THE WRONG BKGND.
if the short name of this bkgnd is "Directory" then
-- THE STRING IS IN THE RIGHT BKGND.
play stop
play harpsichord a7t ae
global undoMemory
put tempMemory into undoMemory
if firstTimeFound then
set lockScreen to false
answer "Keep on pressing RETURN to find next." with "OK"
put false into firstTimeFound
end if
else
-- THE STRING IS IN THE WRONG BKGND.
put the short ID of this card into repeatMark
find string stringToFind
if the short name of this bkgnd is "Directory" then
-- THE RIGHT STRING IN RIGHT BKGND IS FOUND IMMEDIATELY NEXT.
play stop
play harpsichord a7t ae
global undoMemory
put tempMemory into undoMemory
if firstTimeFound then
set lockScreen to false
answer "Keep on pressing RETURN to find next." with "OK"
put false into firstTimeFound
end if
exit mouseUp
end if
-- THE RIGHT STRING IN RIGHT BKGND STILL NEED TO BE FOUND.
repeat until the short ID of this card = repeatMark
find string stringToFind
if the short name of this bkgnd is "Directory" then
-- THE STRING IS FOUND AND IS IN THE RIGHT BKGND.
play stop
play harpsichord a7t ae
global undoMemory
put tempMemory into undoMemory
if firstTimeFound then
set lockScreen to false
answer "Keep on pressing RETURN to find next." with "OK"
put false into firstTimeFound
end if
exit mouseUp
end if
end repeat
-- THE STRING ONLY OCCURS IN THE WRONG BKGND, AND NOWHERE ELSE.
go to card ID tempMemory
play stop
play harpsichord a7t a ae
answer "No such text found." with "OK"
play harpsichord a7t ae
end if
end if
end if
end mouseUp
-- part 19 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=381 top=305 right=337 bottom=417
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Next
----- HyperTalk script -----
on mouseUp
global justFastScan
if not justFastScan then
if the short name of this card is not "Last Page" then
global viewTime, waitTime, undoMemory
if the seconds - viewTime > waitTime then
put the name of this card into undoMemory
end if
visual effect scroll left very fast
go to next card
else
play harpsichord a7t ae
end if
end if
end mouseUp
on mouseDown
global justFastScan
put false into justFastScan
put the ticks into startTime
play stop
play harpsichord a7e
-- holding down the key
repeat until the mouse is up
if the ticks > startTime+30 then
if the short name of this card is not "Last Page" then
put true into justFastScan
go to next card
else
play stop
play harpsichord a7t
end if
end if
end repeat
end mouseDown
-- part 20 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=299 top=305 right=337 bottom=335
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Prev
----- HyperTalk script -----
on mouseUp
global justFastScan
if not justFastScan then
if the short name of this card is not "First Page" then
global viewTime, waitTime, undoMemory
if the seconds - viewTime > waitTime then
put the name of this card into undoMemory
end if
visual effect scroll right very fast
go to prev card
else
play harpsichord a7t ae
end if
end if
end mouseUp
on mouseDown
global justFastScan
put false into justFastScan
put the ticks into startTime
play stop
play harpsichord a7e
-- holding down the key
repeat until the mouse is up
if the ticks > startTime+30 then
if the short name of this card is not "First Page" then
put true into justFastScan
go to prev card
else
play stop
play harpsichord a7t
end if
end if
end repeat
end mouseDown
-- part 21 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=422 top=305 right=337 bottom=458
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Forward
----- HyperTalk script -----
on mouseUp
set the hilite of me to true
global undoMemory, increment, lastPage
put the name of this card into undoMemory
repeat forever
set the hilite of bkgnd button "Flashing Stop" to false
set the hilite of bkgnd button "Flashing Stop" to true
set the hilite of bkgnd button "Flashing Stop" to false
set the hilite of bkgnd button "Flashing Stop" to true
if the mouse is down then
put the mouseLoc into x
if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 422 and item 1 of x < 458 and item 2 of x > 305 and item 2 of x < 337) then
play stop
play harpsichord a7e
click at 341,306
set the hilite of bkgnd button "Forward" to false
set the hilite of bkgnd button "Flashing Stop" to false
exit mouseUp
end if
end if
if the short name of this card is not "Last Page" then
get the number of this card
add increment to it
if it > lastPage then
put lastPage into it
end if
if the mouse is down then
put the mouseLoc into x
if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 422 and item 1 of x < 458 and item 2 of x > 305 and item 2 of x < 337) then
play stop
play harpsichord a7e
click at 341,306
set the hilite of bkgnd button "Forward" to false
set the hilite of bkgnd button "Flashing Stop" to false
exit mouseUp
end if
end if
set lockScreen to true
go to card it
set lockScreen to false
if the mouse is down then
put the mouseLoc into x
if (item 1 of x > 340 and item 1 of x < 376 and item 2 of x > 305 and item 2 of x < 337) or (item 1 of x > 422 and item 1 of x < 458 and item 2 of x > 305 and item 2 of x < 337) then
play stop
play harpsichord a7e
click at 341,306
set the hilite of bkgnd button "Forward" to false
set the hilite of bkgnd button "Flashing Stop" to false
exit mouseUp
end if
end if
else
play stop
play harpsichord a7e
click at 341,306
set the hilite of bkgnd button "Forward" to false
set the hilite of bkgnd button "Flashing Stop" to false